package com.chen.demo.chater3.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chen.demo.chater3.dao.UserMapper;
import com.chen.demo.chater3.domain.User;

@Service
public class UserService {
	@Autowired
	private UserMapper userMapper;
	
	public User findById(int id) {
		return userMapper.findById(id);
	}
	public void saveUser(String name, int age) {
		userMapper.saveUser(name, age);
	}
	public List<User> findAll() {
		return userMapper.findAll();
	}

}
